Automatically convert spaces to dashes in branch names#2916
Open
pBouillon wants to merge 1 commit intogitui-org:masterfrom
Open
Automatically convert spaces to dashes in branch names#2916pBouillon wants to merge 1 commit intogitui-org:masterfrom
pBouillon wants to merge 1 commit intogitui-org:masterfrom
Conversation
extrawurst
reviewed
Apr 23, 2026
| } | ||
| } | ||
|
|
||
| const fn normalize_branch_name_char(c: char) -> char { |
Collaborator
There was a problem hiding this comment.
lets not duplicate this code
Author
There was a problem hiding this comment.
I agree, where would you like it being moved to in order to keep things organized in the repo?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This Pull Request does not close an existing issue.
It changes the following:
This behavior is consistent with how VS Code handles branch name creation, and with how lazygit handles it too. For instance, here's how the branch creation popup is displayed in VS Code:
I'm a long-time gitui user and genuinely love the project but, as I used different tools as part of my professional and personal workflow, this is a small quality-of-life feature I kept missing when coming from other git tools, especially when the issue name is quite long.
I'm not familiar with Rust and wasn't able to set up the toolchain locally, so rather than testing manually I enabled GitHub Actions on my fork and made sure the full CI pipeline passed. Given my limited Rust experience, I may have missed something or done things in a non-idiomatic way. Please let me know if you feel like any change is needed here.
I followed the checklist:
make checkwithout errors